package twodudesdev.amerikick.learnkaratema;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.Toast;

public class Main extends TabActivity {
	void showToast(CharSequence msg) {
        Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
    }
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	    	super.onCreate(savedInstanceState);
    	    	setContentView(R.layout.main);

	    Resources res = getResources();
	    TabHost tabHost = getTabHost();   
	    TabHost.TabSpec spec;   
	    Intent intent;  
	    
	    
	 // Create an Intent to launch an Activity for the tab (to be reused)
	    intent = new Intent().setClass(this,Home.class);

	    // Initialize a TabSpec for each tab and add it to the TabHost
	    spec = tabHost.newTabSpec("").setIndicator("",
	    		res.getDrawable(R.drawable.btn_home))
	    		.setContent(intent);
	    tabHost.addTab(spec);
	    
	 // Create an Intent to launch an Activity for the tab (to be reused)
	    intent = new Intent().setClass(this,Home.class);

	    // Initialize a TabSpec for each tab and add it to the TabHost
	    spec = tabHost.newTabSpec("").setIndicator("",
	    		res.getDrawable(R.drawable.btn_defense))
	    		.setContent(intent);
	    tabHost.addTab(spec);
	    
	 // Create an Intent to launch an Activity for the tab (to be reused)
	    intent = new Intent().setClass(this,Video.class);

	    // Initialize a TabSpec for each tab and add it to the TabHost
	    spec = tabHost.newTabSpec(" ").setIndicator(" ",
	    		res.getDrawable(R.drawable.btn_video))
	    		.setContent(intent);
	    tabHost.addTab(spec);
	    
	 	// Create an Intent to launch an Activity for the tab (to be reused)
	    intent = new Intent().setClass(this,Home.class);

	    // Initialize a TabSpec for each tab and add it to the TabHost
	    spec = tabHost.newTabSpec(" ").setIndicator(" ",
	    		res.getDrawable(R.drawable.btn_location))
	    		.setContent(intent);
	    tabHost.addTab(spec);
	    
    }
}